package com.nulstudio.sppm.Entities;

import java.util.Arrays;
import java.util.Date;

public class IssueInvoice {
    private float totalAmount;
    private float grossProfit;
    private String type;
    private InvoiceEntry[] entries;
    private boolean commited;
    private Date date;
    private int warehouseId;

    public int getWarehouseId() {
        return warehouseId;
    }

    public void setWarehouseId(int warehouseId) {
        this.warehouseId = warehouseId;
    }

    public float getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(float totalAmount) {
        this.totalAmount = totalAmount;
    }

    public float getGrossProfit() {
        return grossProfit;
    }

    public void setGrossProfit(float grossProfit) {
        this.grossProfit = grossProfit;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public InvoiceEntry[] getEntries() {
        return entries;
    }

    public void setEntries(InvoiceEntry[] entries) {
        this.entries = entries;
    }

    public boolean isCommited() {
        return commited;
    }

    public void setCommited(boolean commited) {
        this.commited = commited;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }
    public IssueInvoice(){

    }

    public IssueInvoice(float totalAmount, float grossProfit, String type, InvoiceEntry[] entries, boolean commited, Date date,int warehouseId) {
        this.totalAmount = totalAmount;
        this.grossProfit = grossProfit;
        this.type = type;
        this.entries = entries;
        this.commited = commited;
        this.date = date;
        this.warehouseId = warehouseId;
    }

    @Override
    public String toString() {
        return "IssueInvoice{" +
                "totalAmount=" + totalAmount +
                ", grossProfit=" + grossProfit +
                ", type='" + type + '\'' +
                ", entries=" + Arrays.toString(entries) +
                ", commited=" + commited +
                ", date=" + date +
                '}';
    }
}
